import request from '~/utils/resquest'

// 获取菜单管理列表
export const getSystemMenuList = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/menu/list',
    method: 'get',
    params
  })

// 获取菜单详情
export const getSystemMenuInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/menu/view',
    method: 'get',
    params
  })

// (添加|修改)菜单管理项
export const optionSystemMenuInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/menu/submit',
    method: 'post',
    data: params
  })

// 删除菜单管理项
export const deleteSystemMenuInfo = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/menu/remove',
    method: 'post',
    params
  })

// 获取上级菜单树形列表
export const getMenuTreeByParentId = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/menu/getMenuTreeByParentId',
    method: 'get',
    params
  })
